<template>
  <el-card>
    <el-form inline size="small" :model="searchForm">
      <el-form-item label="标题：" prop="title">
        <el-input
          v-model="searchForm.title"
          clearable
          placeholder="请输入标题"
        />
      </el-form-item>
      <el-form-item label="是否启用：" prop="isShow">
        <el-select v-model="searchForm.isShow" clearable>
          <el-option label="是" :value="1">是</el-option>
          <el-option label="否" :value="0">否</el-option>
        </el-select>
      </el-form-item>
      <el-form-item>
        <el-button type="primary" icon="el-icon-search" @click="handleSearch">
          查询
        </el-button>
      </el-form-item>
    </el-form>
  </el-card>
</template>

<script>
export default {
  name: "SearchCard",
  data() {
    return {
      searchForm: {
        title: "",
        isShow: "",
      },
    };
  },
  methods: {
    handleSearch() {
      this.$emit("onSearch", this.searchForm);
    },
  },
};
</script>

<style lang="scss" scoped>
.el-form-item--small.el-form-item {
  margin-bottom: 0;
}
</style>
